<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateNewsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('news', function (Blueprint $table) {
            $table->increments('id');
            $table->string('media_id',90); // 图文消息media_id
            $table->string('title', 90);
            $table->string('author', 90)->nullable();
            $table->text('digest')->nullable(); // 摘要
            $table->text('content');
            $table->string('content_source_url', 210)->nullable(); // 阅读原文地址
            $table->string('thumb_media_id', 90);
            $table->tinyInteger('show_cover_pic'); // 是否文中显示封面
            $table->text('url'); // 内容也地址
            $table->integer('update_time');


            //$table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('news');
    }
}
